水無瀬の部屋 > Programming > sample > tools > header > toolctrl.h |
---|
1: //*********************************************************
2: // プロジェクト: TOOLS
3: // ファイル名: toolctrl.h
4: //*********************************************************
5: #ifndef TOOLCTRL_HEAD_INCLUDED // 多重インクルードの防止
6: #define TOOLCTRL_HEAD_INCLUDED
7:
8:
9: //*********************************************************
10: // コンパイル環境の指定
11: //*********************************************************
12: #ifndef PRIVATE_TOOLS_HEAD_INCLUDED // 冗長ガード
13: #include <header/_tools.h>
14: #ifndef PRIVATE_TOOLS_HEAD_INCLUDED // ガード名の検査
15: #error "? PRIVATE_TOOLS_HEAD_INCLUDED"
16: #endif // #ifndef PRIVATE_TOOLS_HEAD_INCLUDED
17: #endif // #ifndef PRIVATE_TOOLS_HEAD_INCLUDED
18:
19:
20: //*********************************************************
21: // WINDOWS 標準ヘッダ の インクルード
22: //*********************************************************
23: #include <commctrl.h> // TOOLINFO,
24:
25:
26: //*********************************************************
27: // マクロ の 定義
28: //*********************************************************
29: #if (_WIN32_IE < 0x0300)
30: #define TTM_TRACKACTIVATE (WM_USER + 17) // wParam = TRUE/FALSE start end lparam = LPTOOLINFO
31: #define TTM_TRACKPOSITION (WM_USER + 18) // lParam = dwPos
32: #define TTM_SETTIPBKCOLOR (WM_USER + 19)
33: #define TTM_SETTIPTEXTCOLOR (WM_USER + 20)
34: #define TTM_GETDELAYTIME (WM_USER + 21)
35: #define TTM_GETTIPBKCOLOR (WM_USER + 22)
36: #define TTM_GETTIPTEXTCOLOR (WM_USER + 23)
37: #define TTM_SETMAXTIPWIDTH (WM_USER + 24)
38: #define TTM_GETMAXTIPWIDTH (WM_USER + 25)
39: #define TTM_SETMARGIN (WM_USER + 26) // lParam = lprc
40: #define TTM_GETMARGIN (WM_USER + 27) // lParam = lprc
41: #define TTM_POP (WM_USER + 28)
42: #endif
43: #if (_WIN32_IE < 0x0400)
44: #define TTM_UPDATE (WM_USER + 29)
45: #endif
46: #if (_WIN32_IE < 0x0500)
47: #define TTM_GETBUBBLESIZE (WM_USER + 30)
48: #define TTM_ADJUSTRECT (WM_USER + 31)
49: #define TTM_SETTITLEA (WM_USER + 32) // wParam = TTI_*, lParam = char* szTitle
50: #define TTM_SETTITLEW (WM_USER + 33) // wParam = TTI_*, lParam = wchar* szTitle
51: #endif
52:
53: #if (_WIN32_IE < 0x0300)
54: #define TTF_TRACK 0x0020
55: #define TTF_ABSOLUTE 0x0080
56: #define TTF_TRANSPARENT 0x0100
57: #define TTF_DI_SETITEM 0x8000 // valid only on the TTN_NEEDTEXT callback
58: #endif // _WIN32_IE >= 0x0300
59:
60: #if (_WIN32_IE < 0x0501)
61: #define TTF_PARSELINKS 0x1000
62: #endif // _WIN32_IE >= 0x0501
63:
64: #if (_WIN32_IE < 0x0400)
65: // 拡張リストビュ−スタイル
66: #define LVS_EX_FLATSB 0x00000100 // フラットスクロールバー
67: #define LVS_EX_REGIONAL 0x00000200 //
68: #define LVS_EX_INFOTIP 0x00000400 // listview does InfoTips for you
69: #define LVS_EX_UNDERLINEHOT 0x00000800 //
70: #define LVS_EX_UNDERLINECOLD 0x00001000 //
71: #define LVS_EX_MULTIWORKAREAS 0x00002000 //
72: #if (_WIN32_IE < 0x0300)
73: #define LVS_EX_GRIDLINES 0x00000001 //
74: #define LVS_EX_SUBITEMIMAGES 0x00000002 //
75: #define LVS_EX_CHECKBOXES 0x00000004 // チェックボックス
76: #define LVS_EX_TRACKSELECT 0x00000008 //
77: #define LVS_EX_HEADERDRAGDROP 0x00000010 // ヘッダを移動可能にする
78: #define LVS_EX_FULLROWSELECT 0x00000020 // 一行選択
79: #define LVS_EX_ONECLICKACTIVATE 0x00000040 //
80: #define LVS_EX_TWOCLICKACTIVATE 0x00000080 //
81:
82: #define LVM_SETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+54) //
83: #define LVM_GETEXTENDEDLISTVIEWSTYLE (LVM_FIRST+55) //
84: #define ListView_SetExtendedListViewStyle(hwndLV,dw) ((DWORD)SendMessage((hwndLV),LVM_SETEXTENDEDLISTVIEWSTYLE,0,(dw)))
85: #define ListView_GetExtendedListViewStyle(hwndLV) ((DWORD)SendMessage((hwndLV),LVM_GETEXTENDEDLISTVIEWSTYLE,0,0))
86: #define ListView_GetCheckState(hwndLV,i) ((((UINT)(SNDMSG((hwndLV), LVM_GETITEMSTATE, (WPARAM)i, LVIS_STATEIMAGEMASK))) >> 12) -1)
87: #endif // #if (_WIN32_IE < 0x0300)
88: #endif // #if (_WIN32_IE < 0x0400)
89:
90:
91: //*********************************************************
92: // 関数 の 宣言
93: //*********************************************************
94: #ifdef __cplusplus
95: extern "C" {
96: #endif
97:
98:
99: // toolctrl.cpp
100:
101: //---------------------------------------------------------
102: // Accelerator
103: //---------------------------------------------------------
104: int GetAcceleratorCount( HACCEL hAccel );
105: ACCEL *LoadAcceleratorTable( HINSTANCE hInstance, const char *tablename, int *num );
106:
107:
108: //---------------------------------------------------------
109: // Button
110: //---------------------------------------------------------
111: bool IsDlgItemButtonControl( HWND hwndDlg, int nID );
112: bool IsWindowButtonControl( HWND hwndButton );
113:
114:
115: //---------------------------------------------------------
116: // ComboBox
117: //---------------------------------------------------------
118: LPARAM ComboBox_GetCurSelItemData( HWND hwndCombo );
119: int ComboBox_GetCurSelTextLength( HWND hwndCombo );
120: bool IsDlgItemComboBoxControl( HWND hwndDlg, int nID );
121: bool IsWindowComboBoxControl( HWND hwndCombo );
122:
123:
124: //---------------------------------------------------------
125: // Edit
126: //---------------------------------------------------------
127: void Edit_AddText( HWND hwndEdit, const char *string );
128: char *Edit_AllocText( HWND hwndEdit );
129: int Edit_GetSelLength( HWND hwndEdit );
130: WORD Edit_GetSelStart( HWND hwndEdit );
131: bool Edit_IsAllSelected( HWND hwndEdit );
132: void Edit_ReplaceSelText( HWND hwndEdit, const char *string );
133: bool IsDlgItemEditControl( HWND hwndDlg, int nID );
134: bool IsWindowEditControl( HWND hwndEdit );
135:
136:
137: //---------------------------------------------------------
138: // Header
139: //---------------------------------------------------------
140: LRESULT Header_HitTest( HWND hwndHeader, UINT flags, POINT pt );
141: bool IsDlgItemHeaderControl( HWND hwndDlg, int nID );
142: bool IsWindowHeaderControl( HWND hwndHeader );
143:
144:
145: //---------------------------------------------------------
146: // Hotkey
147: //---------------------------------------------------------
148: DWORD Hotkey_GetHotkey( HWND hwndHotkey );
149: void Hotkey_SetHotkey( HWND hwndHotkey, WPARAM wHotkey );
150: void Hotkey_SetRules( HWND hwndHotkey, WPARAM wRules, LPARAM lDefault );
151: bool IsDlgItemHotkeyControl( HWND hwndDlg, int nID );
152: bool IsWindowHotkeyControl( HWND hwndHotkey );
153:
154:
155: //---------------------------------------------------------
156: // ListBox
157: //---------------------------------------------------------
158: bool IsDlgItemListBoxControl( HWND hwndDlg, int nID );
159: bool IsWindowListBoxControl( HWND hListBox );
160: int ListBox_AddItem( HWND hListBox, const char *string, LPARAM lParam );
161: LRESULT ListBox_InitStorage( HWND hListBox, int nItems, DWORD dwSize );
162: int ListBox_InsertItem( HWND hListBox, int nIndex, const char *string, LPARAM lParam );
163: bool ListBox_IsValidIndex( HWND hListBox, int nIndex );
164: int ListBox_MoveItem( HWND hListBox, int to, int from );
165:
166:
167: //---------------------------------------------------------
168: // ListView
169: //---------------------------------------------------------
170: bool IsDlgItemListViewControl( HWND hwndDlg, int nID );
171: bool IsWindowListViewControl( HWND hListView );
172: int ListView_AddIconImage( HWND hListView, int nImageListType, HICON hIcon );
173: bool ListView_DestroyImageList( HWND hListView, int nImageListType );
174: int ListView_GetCursorItem( HWND hListView );
175: LPARAM ListView_GetItemParam( HWND hListView, int nIndex, int nSubItem );
176: int ListView_InsertNewColumn( HWND hListView, int nIndex, UINT mask, int fmt, int nWidth, char *string );
177: bool ListView_IsValidIndex( HWND hListView, int nIndex );
178: DWORD ListView_SetExtendedStyle( HWND hListView, DWORD dwSetStyle );
179: bool ListView_SetItemParam( HWND hListView, int nIndex, int nSubItem, LPARAM lParam );
180:
181:
182: //---------------------------------------------------------
183: // Scrollbar
184: //---------------------------------------------------------
185: int GetScrollbarPageSize( HWND hWnd, int nType );
186: int GetScrollbarRangeMax( HWND hWnd, int nType );
187: int GetScrollbarRangeMin( HWND hWnd, int nType );
188: int GetScrollbarTrackPos( HWND hWnd, int nType );
189: bool MakeScrollInfo( SCROLLINFO *si, UINT fMask, int nMin, int nMax, UINT nPage, int nPos, int nTrackPos );
190:
191:
192: //---------------------------------------------------------
193: // StatusBar
194: //---------------------------------------------------------
195: bool IsStatusWindow( HWND hStatusbar );
196: bool StatusBar_SetParts( HWND hStatusbar, int nParts, int *pWidths );
197: bool StatusBar_SetText( HWND hStatusbar, int nIndex, UINT uType, const char *text );
198:
199:
200: //---------------------------------------------------------
201: // Spin
202: //---------------------------------------------------------
203: bool IsDlgItemSpinControl( HWND hwndDlg, int nID );
204: bool IsWindowSpinControl( HWND hwndSpin );
205: HWND Spin_SetBuddy( HWND hwndSpin, HWND hwndBuddy );
206: short Spin_SetPos( HWND hwndSpin, int nPos );
207: void Spin_SetRange( HWND hwndSpin, int nLower, int nUpper );
208:
209:
210: //---------------------------------------------------------
211: // ToolTip
212: //---------------------------------------------------------
213: HWND CreateToolTip( HWND hParent, HINSTANCE hInstance, DWORD dwStyle, DWORD dwExStyle );
214: bool IsWindowToolTipControl( HWND hToolTip );
215: bool ToolTip_AddDlgItem( HWND hToolTip, UINT flags, HWND hOwner, HWND hWnd, int nID );
216: bool ToolTip_AddDlgItemString( HWND hToolTip, UINT flags, HWND hOwner, HWND hWnd, int nID, char *string );
217: bool ToolTip_AddWindow( HWND hToolTip, UINT uFlags, HWND hOwner, HWND hTool );
218: bool ToolTip_AddWindowString( HWND hToolTip, UINT uFlags, HWND hOwner, HWND hTool, char *string );
219: void ToolTip_Enanble( HWND hToolTip, bool bEnable );
220: void ToolTip_SetDelayTime( HWND hToolTip, DWORD dwFlag, int nTime );
221: LRESULT ToolTip_SetMaxTipWidth( HWND hToolTip, int nWidth );
222: void ToolTip_TrackActivate( HWND hToolTip, bool bActivate, const TOOLINFO *ti );
223: void ToolTip_TrackPosition( HWND hToolTip, int nPosX, int nPosY );
224:
225:
226: //---------------------------------------------------------
227: // Dialog
228: //---------------------------------------------------------
229: int MesBox( HWND hWnd, const char *gTitleStr, const char *gStr, UINT gMsgBoxOption = MB_OK );
230: int MesBoxEx( HWND hWnd, UINT uType, const char *lpCaption, const char *format, ... );
231: bool ColorBox( HWND hOwner, COLORREF *rgbColor );
232: bool ColorBoxEx( HWND hOwner, HINSTANCE hInstance, const char *Template, LPCCHOOKPROC HookProc, DWORD Flags, COLORREF *rgbColor, LPARAM UserData );
233: bool OpenFileBox( HWND hWnd, DWORD Flags, char *buffer, int bufsize, const char *Default, const char *Title, const char *Filter );
234: bool OpenFileBoxEx( HWND hWnd, HINSTANCE hInstance, const char *Template, LPOFNHOOKPROC HookProc, DWORD Flags, char *File, int bufsize, const char *Default, const char *Title, const char *Filter, LPARAM UserData );
235: bool SaveFileBox( HWND hWnd, DWORD Flags, char *buffer, int bufsize, const char *Default, const char *Title, const char *Filter );
236: bool SaveFileBoxEx( HWND hWnd, HINSTANCE hInstance, const char *Template, LPOFNHOOKPROC HookProc, DWORD Flags, char *File, int bufsize, const char *Default, const char *Title, const char *Filter, LPARAM UserData );
237:
238:
239:
240: #ifdef __cplusplus
241: } // extern "C"
242: #endif
243:
244:
245: #endif // #ifndef TOOLCTRL_HEAD_INCLUDED
246:
247:
248: //** end **
249:
参照:
toolctrl.cpp, tools.h
水無瀬の部屋 > sample > tools > header > toolctrl.h |
---|
このページは cpp2web が出力しました。
水無瀬 優 postmaster@katsura-kotonoha.sakura.ne.jp
http://katsura-kotonoha.sakura.ne.jp/prog/code/tools/header/toolctrl_h.shtml
同人ダウンロード販売|DL.Getchu.com